package com.ehsy.service;

import com.dtflys.forest.annotation.*;
import com.dtflys.forest.callback.OnSuccess;
import com.dtflys.forest.converter.json.ForestJacksonConverter;
import com.dtflys.forest.http.ForestRequest;
import com.dtflys.forest.http.ForestResponse;
import com.ehsy.common.ResponseVo;
import com.ehsy.model.UserInfo;
import org.springframework.stereotype.Component;

import javax.xml.ws.Response;

/**
 * @author YanZhen_Li
 * @version 1.0
 * @title RequestAndResponseServic
 * @description
 * @create 2024/6/18 12:11
 */
@Component
@Address(host = "127.0.0.1", port = "8080")
public interface RequestAndResponseServic {
    /**
     * 返回请求对象
     */
    @Get("/test/request/json/body")
    ForestRequest<?> test1(@Query UserInfo user);

    /**
     * 返回响应体对象
     */
    @Get("/test/request/json/body")
    ForestResponse<ResponseVo<UserInfo>> test2(@JSONBody UserInfo user);

    /**
     * 返回响应体对象
     */
    @Get("/test/request/json/body")
    void test3(@JSONBody UserInfo user, OnSuccess<ResponseVo<UserInfo>> onSuccess);
}
